import 'dart:ui';

import 'package:flutter/material.dart';
import 'package:flutter6/pages/player/control_panel_1.dart';
import 'package:flutter6/pages/player/control_panel_2.dart';
import 'package:flutter6/pages/player/header.dart';
import 'package:flutter6/pages/player/player_inner.dart';
import 'package:flutter6/pages/player/progress.dart';
import '../../util/screen_util.dart';

class PlayerPage extends StatelessWidget{
  const PlayerPage({super.key});

  @override
  Widget build(BuildContext context) {
    final screen = Screen(context);
    var args = ModalRoute.of(context)?.settings.arguments as Map;
    print(args);
    return Scaffold(
      body: Container(
        child: Stack(
          children: [
            Image.asset('assets/tmp_cover_7.jpg',height: screen.height,width: screen.width,fit: BoxFit.fill,),
            Positioned(
              child: BackdropFilter(
                filter: ImageFilter.blur(sigmaX: 100, sigmaY: 100),
                child: Container(
                  color: Colors.black.withOpacity(0.2),
                )
              ),
            ),
            Container(
              padding: EdgeInsets.only(top: screen.top, left: screen.calc(24), right: screen.calc(24)),
              child: Column(
                children: [
                  Header(),
                  PlayerInner(playing: false,),
                ],
              ),
            ),
            Positioned(
              bottom: 0,
              width: screen.width,
              child: Container(
                child: Column(
                  children: [
                    ControlPanel1(),
                    Progress(current: 96, total: 568),
                    ControlPanel2(),
                  ],
                ),
              )
            ),
          ],
        ),
      ),
    );
  }
  
}